using System.Data.Common;

namespace Library.OrmEnterpriseEntity.Factor {
	/// <summary>
	/// Create connection into DBMS interface
	/// </summary>
	public interface IConnectionCreator {
		/// <summary>
		/// Create new connection
		/// </summary>
		/// <returns></returns>
		DbConnection CreateConnection();
		/// <summary>
		/// Create new connection with specific connection string
		/// </summary>
		/// <param name="connectionString"></param>
		/// <returns></returns>
		DbConnection CreateConnection(string connectionString);

		/// <summary>
		/// Default isolation level when user not determine iso level
		/// </summary>
		System.Data.IsolationLevel DefaultLevel { get; }
	}
}
